package oa.hleast.xswl.mapper.chat;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import oa.hleast.xswl.pojo.domain.chat.CmsChatAutoReply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author 302
 * @date 2021/4/22
 */
@Mapper
public interface ChatAutoReplyMapper extends BaseMapper<CmsChatAutoReply> {

    @Select("select * from cms_chat_auto_reply where #{distinguishValue} like concat('%',key_comment,'%') order by priority,id desc  limit 1")
    CmsChatAutoReply matchingReply(String distinguishValue);
}
